<!DOCTYPE html>
<html lang="en">
<head>
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
  <meta charset="UTF-8">
  <title>超市 - 进销存 - 员工管理</title>
  <link rel="stylesheet" href="/layui2/css/layui.css">
  <link rel="stylesheet" href="/css/public.css">
  <link rel="stylesheet" href="/css/admin/emp.css">
</head>
<body class="layui-layout-body" onload="loadEmp()">
<div class="layui-layout layui-layout-admin">
  <div class="layui-header">
    <div class="layui-logo">超市进销存管理系统</div>
    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item">
        <a href="javascript:void(0)" class="name">贤心</a>
        <dl class="layui-nav-child">
          <dd><a href="javascript:void(0)">基本资料</a></dd>
          <dd><a href="javascript:void(0)">安全设置</a></dd>
        </dl>
      </li>
      <li class="layui-nav-item"><a href="javascript:void(0)" onclick="logout()">退出登录</a></li>
    </ul>
  </div>
  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      <ul class="layui-nav layui-nav-tree" lay-filter="test">
        <li class="layui-nav-item layui-nav-itemed">
          <a class="javascript:void(0)" href="javascript:void(0)">员工管理</a>
        </li>
      </ul>
    </div>
  </div>
  <div class="layui-body">
    <div class="title">员工管理</div>
    <div class="table-container">
      <table class="layui-hide" id="emp" lay-filter="emp"></table>
      <script type="text/html" id="emp-toolbar">
        <button class="layui-btn layui-btn-primary layui-input-radius" lay-event="add">添加</button>
        <button class="layui-btn layui-btn-primary layui-input-radius" lay-event="del">批量删除</button>
        <input type="text" id="search" class="layui-input layui-input-radius" placeholder="请输入员工姓名" title="">
        <button class="layui-btn layui-btn-primary layui-input-radius" onclick="search()">搜索</button>
      </script>
      <script type="text/html" id="emp-tool">
        <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
        <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
      </script>
      <div id="emp-page"></div>
    </div>
  </div>
</div>
<section id="add-emp-layout">
  <div class="layout-background display-none" onclick="hideLayout($('#add-emp-layout'))"></div>
  <div class="layout-box display-none">
    <form class="layui-form" action="javascript:void(0)">
      <div class="layout-header">
        <span class="layout-title">添加员工</span>
        <span class="layout-close" onclick="hideLayout($('#add-emp-layout'))">+</span>
      </div>
      <div class="layout-container">
        <div class="layui-form-item">
          <label class="layui-form-label">姓名</label>
          <div class="layui-input-block">
            <input type="text" name="name" required lay-verify="required" placeholder="请输入员工姓名" autocomplete="off"
                   class="layui-input" title="">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">手机号</label>
          <div class="layui-input-block">
            <input type="text" name="phone" required lay-verify="required" placeholder="请输入员工手机号"
                   autocomplete="off" class="layui-input" title="">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">邮箱</label>
          <div class="layui-input-block">
            <input type="text" name="email" required lay-verify="required" placeholder="请输入员工邮箱"
                   autocomplete="off" class="layui-input" title="">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">地址</label>
          <div class="layui-input-block">
            <input type="text" name="address" required lay-verify="required" placeholder="请输入联系地址"
                   autocomplete="off" class="layui-input" title="">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">性别</label>
          <div class="layui-input-block">
            <input type="radio" name="gender" value="1" title="男" checked>
            <input type="radio" name="gender" value="0" title="女">
          </div>
        </div>
      </div>
      <div class="layout-footer">
        <button class="layui-btn layui-input-radius" lay-submit lay-filter="add">确定添加</button>
        <button type="reset" class="layui-btn layui-btn-primary layui-input-radius"
                onclick="hideLayout($('#add-emp-layout'))">
          取消
        </button>
      </div>
    </form>
  </div>
</section>
<section id="emp-detail-layout">
  <div class="layout-background display-none" onclick="hideLayout($('#emp-detail-layout'))"></div>
  <div class="layout-box display-none">
    <div class="layout-header">
      <span class="layout-title"></span>
      <span class="layout-close" onclick="hideLayout($('#emp-detail-layout'))">+</span>
    </div>
    <div class="layout-container">
      <div class="detail-col">
        <div class="layui-form-item">
          <label class="layui-form-label">员工ID</label>
          <div class="layui-input-block">
            <input type="text" name="id" required lay-verify="required" autocomplete="off" readonly="readonly"
                   class="layui-input" title="">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">员工姓名</label>
          <div class="layui-input-block">
            <input type="text" name="name" required lay-verify="required" autocomplete="off" readonly="readonly"
                   class="layui-input" title="">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">员工编号</label>
          <div class="layui-input-block">
            <input type="text" name="code" required lay-verify="required" autocomplete="off" readonly="readonly"
                   class="layui-input" title="">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">加入时间</label>
          <div class="layui-input-block">
            <input type="text" name="ctime" required lay-verify="required" autocomplete="off" readonly="readonly"
                   class="layui-input" title="">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">是否锁定</label>
          <div class="layui-input-block">
            <input type="text" name="lock" required lay-verify="required" autocomplete="off" readonly="readonly"
                   class="layui-input" title="">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">锁定时间</label>
          <div class="layui-input-block">
            <input type="text" name="ltime" required lay-verify="required" autocomplete="off" readonly="readonly"
                   class="layui-input" title="">
          </div>
        </div>
      </div>
      <div class="detail-col">
        <div class="layui-form-item">
          <label class="layui-form-label">信息更新时间</label>
          <div class="layui-input-block">
            <input type="text" name="utime" required lay-verify="required" autocomplete="off" readonly="readonly"
                   class="layui-input" title="">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">员工手机号</label>
          <div class="layui-input-block">
            <input type="text" name="phone" required lay-verify="required" autocomplete="off" readonly="readonly"
                   class="layui-input" title="">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">员工地址</label>
          <div class="layui-input-block">
            <input type="text" name="address" required lay-verify="required" autocomplete="off" readonly="readonly"
                   class="layui-input" title="">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">员工邮箱</label>
          <div class="layui-input-block">
            <input type="text" name="email" required lay-verify="required" autocomplete="off" readonly="readonly"
                   class="layui-input" title="">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">员工性别</label>
          <div class="layui-input-block">
            <input type="text" name="gender" required lay-verify="required" autocomplete="off" readonly="readonly"
                   class="layui-input" title="">
          </div>
        </div>
      </div>
      <div class="layui-clear"></div>
    </div>
  </div>
</section>
<section id="edit-emp-layout">
  <div class="layout-background display-none" onclick="hideLayout($('#edit-emp-layout'))"></div>
  <div class="layout-box display-none">
    <form action="javascript:void(0)" class="layui-form">
      <div class="layout-header">
        <span class="layout-title"></span>
        <span class="layout-close" onclick="hideLayout($('#edit-emp-layout'))">+</span>
      </div>
      <div class="layout-container">
        <div class="layui-form-item">
          <label class="layui-form-label">员工ID</label>
          <div class="layui-input-block">
            <input type="text" name="id" required lay-verify="required" autocomplete="off" readonly="readonly"
                   class="layui-input" title="">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">员工姓名</label>
          <div class="layui-input-block">
            <input type="text" name="name" required lay-verify="required" autocomplete="off"
                   class="layui-input" title="">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">员工手机号</label>
          <div class="layui-input-block">
            <input type="text" name="phone" required lay-verify="required" autocomplete="off"
                   class="layui-input" title="">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">员工联系地址</label>
          <div class="layui-input-block">
            <input type="text" name="address" required lay-verify="required" autocomplete="off"
                   class="layui-input" title="">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">员工邮箱</label>
          <div class="layui-input-block">
            <input type="text" name="email" required lay-verify="required" autocomplete="off"
                   class="layui-input" title="">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">锁定</label>
          <div class="layui-input-block">
            <input type="checkbox" name="lock" lay-skin="switch" lay-text="锁定|解除" title="" >
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">员工性别</label>
          <div class="layui-input-block">
            <input type="radio" name="gender" value="女" title="女">
            <input type="radio" name="gender" value="男" title="男">
          </div>
        </div>
      </div>
      <div class="layout-footer">
        <button class="layui-btn layui-input-radius" lay-submit lay-filter="edit">确定修改</button>
        <button class="layui-btn layui-btn-primary layui-input-radius"
                onclick="hideLayout($('#edit-emp-layout'))">取消</button>
      </div>
    </form>
  </div>
</section>
<footer>
  <script src="/js/jquery.min.js"></script>
  <script src="/layui2/layui.js"></script>
  <script src="/js/admin/emp.js"></script>
</footer>
</body>
</html>